package hcn.api.service.brandnew.archive;

import ctd.controller.exception.ControllerException;
import ctd.util.annotation.RpcService;
import hcn.protocol.brandnew.archive.*;
import hcn.protocol.brandnew.feiyong.feiyongqingdan.GetPatientTempRequest;
import hcn.protocol.brandnew.feiyong.feiyongqingdan.GetPatientTempResponse;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * chis系统接口
 *
 * @author chiNa_suma
 * @created 2015年8月13日 下午2:27:38
 */
@Component
public interface IChisApiService {

    /********************************************↓↓↓↓健康档案↓↓↓↓****************************************************************/

    /**
     * 查询个档列表
     */
    @RpcService
    List<QueryArchiveListResponse> queryArchiveList(QueryArchiveListRequest request) throws ControllerException;


    @RpcService
    List<GetPatientTempResponse> getPatientTemp(GetPatientTempRequest request) throws ControllerException;

    /**
     * 查询个档详情
     */
    @RpcService
    GetArchiveDetailResponse getArchiveDetail(GetArchiveDetailRequest request) throws ControllerException;

    /**
     * 新建个人档案
     */
    @RpcService
    AddArchiveResponse addArchive(AddArchiveRequest request) throws ControllerException;

    /**
     * 修改个人档案
     */
    @RpcService
    UpdateArchiveResponse updateArchive(UpdateArchiveRequest request) throws ControllerException;

    /**
     * 健康档案标识查询
     */
    @RpcService
    ValidateIdCardExistResponse validateIdCardExist(ValidateIdCardExistRequest request) throws ControllerException;


    /**
     * 查询家庭成员健康档案标识查询
     */
    @RpcService
    List<ValidateIdCardExistResponse> validateFamilyIdCardExist(ValidateFamilyIdCardExistRequest request) throws ControllerException;


    /********************************************↓↓↓↓慢病档案↓↓↓↓****************************************************************/

    /**
     * 高血压档案列表获取
     */
    @RpcService
    List<QueryHypertensionArchiveListResponse> queryHypertensionArchiveList(QueryHypertensionArchiveListRequest request) throws ControllerException;

    /**
     * 高血压档案详情获取
     */
    @RpcService
    GetHypertensionArchiveDetailResponse getHypertensionArchiveDetail(GetHypertensionArchiveDetailRequest request) throws ControllerException;

    /**
     * 新增高血压档案
     */
    @RpcService
    AddHypertensionArchiveResponse addHypertensionArchive(AddHypertensionArchiveRequest request) throws ControllerException;

    /**
     * 修改高血压档案
     */
    @RpcService
    UpdateHypertensionArchiveResponse updateHypertensionArchive(UpdateHypertensionArchiveRequest request) throws ControllerException;

    /**
     * 糖尿病档案列表获取
     */
    @RpcService
    List<QueryDiabetesArchiveListResponse> queryDiabetesArchiveList(QueryDiabetesArchiveListRequest request) throws ControllerException;

    /**
     * 糖尿病档案详情获取
     */
    @RpcService
    GetDiabetesArchiveDetailResponse getDiabetesArchiveDetail(GetDiabetesArchiveDetailRequest request) throws ControllerException;

    /**
     * 新增糖尿病档案
     */
    @RpcService
    AddDiabetesArchiveResponse addDiabetesArchive(AddDiabetesArchiveRequest request) throws ControllerException;

    /**
     * 修改糖尿病档案
     */
    @RpcService
    UpdateDiabetesArchiveResponse updateDiabetesArchive(UpdateDiabetesArchiveRequest request) throws ControllerException;


    /********************************************↓↓↓↓健康随访↓↓↓↓****************************************************************/

    /**
     * 查询慢病随访计划列表
     */
    @RpcService
    List<QueryVisitPlansResponse> queryVisitPlans(QueryVisitPlansRequest request) throws ControllerException;

    /**
     * 保存随访记录
     */
    @RpcService
    AddVisitResponse addVisit(AddVisitRequest request) throws ControllerException;

    /**
     * 根据empiId查询历史随访记录
     */
    @RpcService
    GetHistoryVisitByEmpiIdResponse getHistoryVisitByEmpiId(GetHistoryVisitByEmpiIdRequest request) throws ControllerException;

    /**
     * 根据visitId查询随访记录详情
     */
    @RpcService
    GetVisitByVisitIdResponse getVisitByVisitId(GetVisitByVisitIdRequest request) throws ControllerException;

//    /**
//     * 查询上一次高血压随访药品
//     */
//    QueryLastHypertensionMedicinesResponse queryLastHypertensionMedicines(QueryLastHypertensionMedicinesRequest request) throws ControllerException;
//
//    /**
//     * 查询上一次糖尿病随访药品
//     */
//    QueryLastDiabetesMedicinesResponse queryLastDiabetesMedicines(QueryLastDiabetesMedicinesRequest request) throws ControllerException;
//
//    /**
//     * 查询随访药品
//     */
//    QueryMedicinesResponse queryMedicines(QueryMedicinesRequest request) throws ControllerException;


    /********************************************↓↓↓↓建档申请↓↓↓↓****************************************************************/

    /**
     * 保存建档申请
     */
//    SaveResidentArchivesApplyInfoResponse saveResidentArchivesApplyInfo(SaveResidentArchivesApplyInfoRequest request) throws ControllerException;
//
//    String queryArchiveApplyList(QueryArchiveApplyListQO qo) throws ControllerException;
//
//    String queryArchiveApplyDetail(String archiveApplyId) throws ControllerException;
//
//    String operateArchiveApply(OperateArchiveApplyQO qo) throws ControllerException;


    /********************************************↓↓↓↓档案迁移申请↓↓↓↓****************************************************************/

    /**
     * 通过网格地址查询机构信息
     **/
    GetManaUnitListByRegionCodeResponse getManaUnitListByRegionCode(GetManaUnitListByRegionCodeRequest request) throws ControllerException;

//    String getPersonalInfo(String uid, String idCardType, String idCard) throws ControllerException;
//

    /**
     * 根据医生查询网格地址
     */
    List<ChisGridAddressResponse> queryGridAddressList(ChisGridAddressRequest request) throws ControllerException;
//
//    String queryManaDoctors(String uid, String manageUnitId, String content) throws ControllerException;
//
//    String queryGridList(String uid, String regionCode, String manageUnitId, String query, Integer pageNo, Integer pageSize) throws ControllerException;
//
//    String queryUidList(String uid, String manageUnitId, Integer pageNo, Integer pageSize) throws ControllerException;
//
//    String commitMigrationApply(CommitMigrationApplyQO qo) throws ControllerException;
//
//    String queryMigrationApplyList(String uid, String recordId, String status, String content, Integer pageNo, Integer pageSize) throws ControllerException;
//
//    String queryFamilyMemberList(String uid, String cardNo) throws ControllerException;
//
//    String queryOrgList(String regionCode) throws ControllerException;


    /********************************************↓↓↓↓中医体质辨识、老年人自理能力评估↓↓↓↓****************************************************************/

    /**
     * 推送老年人评估结果到公卫
     */
    @RpcService
    void submitOldPersonAssessment(SendAssessmentResultRequest request) throws ControllerException;

    /**
     * 推送中医体质辨识结果到公卫
     */
    @RpcService
    void submitPhysique(SubmitPhysiqueRequest request) throws ControllerException;

    /**
     * 查询需要完成中医体质辨识和老年人自理能力评估的居民列表
     */
    @RpcService
    List<ResidentArchiveResponse> queryResidentInfo(ResidentArchiveRequest residentArchiveQo) throws ControllerException;


    /********************************************↓↓↓↓家医签约满意度调查↓↓↓↓****************************************************************/


    /**
     * 查询签约记录
     */
    @RpcService
    ScRecordPageResponse findScRecord(ScRecordRequest scRecordRequest) throws ControllerException;


    /**
     * 同步问卷推送结果
     */
    @RpcService
    void saveFgQsStatus(SaveFgQsStatusBatchRequest request) throws ControllerException;

    /**
     * 同步问卷满意结果
     */
    @RpcService
    void saveSdQsStatus(SaveSdQsStatusBatchRequest request) throws ControllerException;

    /********************************************↓↓↓↓家医签约↓↓↓↓****************************************************************/

    /**
     * 签约状态更新
     */
    @RpcService
    void updateSignFlag(UpdateSignFlagRequest request) throws ControllerException;

    /********************************************↓↓↓↓生活服务↓↓↓↓****************************************************************/

//    //获取患者的隔离观察列表
//    String queryQuarantlineVisitList(QueryQuarantlineQO qo) throws ControllerException;
//
//    //生活服务记录列表
//    String queryIsolationAssistanceList(QueryIsolationAssistanceQO qo) throws ControllerException;
//
//    //生活服务保存
//    String saveIsolationAssistance(AddIsolationAssistanceQO qo) throws ControllerException;
//
//    //修改生活服务
//    String updateIsolationAssistance(AddIsolationAssistanceQO qo) throws ControllerException;
//
//    //生活服务取消
//    String cancelIsolationAssistance(String isolationAssistanceId) throws ControllerException;


    /********************************************↓↓↓↓体温单↓↓↓↓****************************************************************/

//    /**
//     * 查询体温单列表
//     */
//    List<TemperatureSheetVO> queryTemperatureSheetList(TemperatureSheetQO qo) throws ControllerException;

    /**
     * 校验token是否失效
     *
     * @param request
     * @return
     */
    @RpcService
    Boolean verifyToken(VerifyTokenRequest request);
}
